package com.choudou5.solr.analyzer;

import com.choudou5.solr.analyzer.tokenizer.PinyinTokenizer;
import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.Tokenizer;

import java.io.Reader;

/**
 * <pre>
 * 描述：拼音 分析器
 * 构建组：solr.analyzer 
 * 作者：choudou5
 * 邮箱: hsolr@hotmail.com
 * 日期:Jul 15,
 * </pre>
 */
public class PinyinAnalyzer extends Analyzer {

	protected TokenStreamComponents createComponents(String fieldName, Reader in) {
		Tokenizer token = new PinyinTokenizer(in);
		return new TokenStreamComponents(token);
	}
	
}